#线程测试

import threading
import time

def printA():
    for i in range(5):
        print("A")
        time.sleep(1)

def printB():
    for i in range(5):
        print("B")
        time.sleep(1)

#传参
def printC(name,age):
    for i in range(5):
        print(name,"-",age)
        time.sleep(1)

if __name__ == '__main__':
    t1 = threading.Thread(target=printA)
    t2 = threading.Thread(target=printB)
    t3 = threading.Thread(target=printC, args=("C","18")) #元组传参,按照顺序
    t4 = threading.Thread(target=printC, kwargs={"name":"C","age":"18"})#字典传参
    t1.start()
    t2.start()
    t3.start()
    t4.start()
    # t1.join()
    # t2.join()
    print("end")